3.6 \(\int \frac {\sin (x)}{a+a \sin (x)} \, dx\)

Optimal. Leaf size=17 \[ \frac {x}{a}+\frac {\cos (x)}{a \sin (x)+a} \]

[Out]

x/a+cos(x)/(a+a*sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2735, 2648} \[ \frac {x}{a}+\frac {\cos (x)}{a \sin (x)+a} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]/(a + a*Sin[x]),x]

[Out]

x/a + Cos[x]/(a + a*Sin[x])

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {\sin (x)}{a+a \sin (x)} \, dx &=\frac {x}{a}-\int \frac {1}{a+a \sin (x)} \, dx\\ &=\frac {x}{a}+\frac {\cos (x)}{a+a \sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 42, normalized size = 2.47 \[ \frac {\left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right ) \left ((x-2) \sin \left (\frac {x}{2}\right )+x \cos \left (\frac {x}{2}\right )\right )}{a (\sin (x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]/(a + a*Sin[x]),x]

[Out]

((Cos[x/2] + Sin[x/2])*(x*Cos[x/2] + (-2 + x)*Sin[x/2]))/(a*(1 + Sin[x]))

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 28, normalized size = 1.65 \[ \frac {{\left (x + 1\right )} \cos \relax (x) + {\left (x - 1\right )} \sin \relax (x) + x + 1}{a \cos \relax (x) + a \sin \relax (x) + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="fricas")

[Out]

((x + 1)*cos(x) + (x - 1)*sin(x) + x + 1)/(a*cos(x) + a*sin(x) + a)

________________________________________________________________________________________

giac [A]  time = 0.92, size = 19, normalized size = 1.12 \[ \frac {x}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="giac")

[Out]

x/a + 2/(a*(tan(1/2*x) + 1))

________________________________________________________________________________________

maple [A]  time = 0.07, size = 25, normalized size = 1.47 \[ \frac {2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{a}+\frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a+a*sin(x)),x)

[Out]

2/a*arctan(tan(1/2*x))+2/a/(tan(1/2*x)+1)

________________________________________________________________________________________

maxima [A]  time = 0.82, size = 32, normalized size = 1.88 \[ \frac {2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{a} + \frac {2}{a + \frac {a \sin \relax (x)}{\cos \relax (x) + 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="maxima")

[Out]

2*arctan(sin(x)/(cos(x) + 1))/a + 2/(a + a*sin(x)/(cos(x) + 1))

________________________________________________________________________________________

mupad [B]  time = 6.54, size = 19, normalized size = 1.12 \[ \frac {2}{a\,\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}+\frac {x}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a + a*sin(x)),x)

[Out]

2/(a*(tan(x/2) + 1)) + x/a

________________________________________________________________________________________

sympy [B]  time = 0.84, size = 34, normalized size = 2.00 \[ \frac {x \tan {\left (\frac {x}{2} \right )}}{a \tan {\left (\frac {x}{2} \right )} + a} + \frac {x}{a \tan {\left (\frac {x}{2} \right )} + a} + \frac {2}{a \tan {\left (\frac {x}{2} \right )} + a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x)

[Out]

x*tan(x/2)/(a*tan(x/2) + a) + x/(a*tan(x/2) + a) + 2/(a*tan(x/2) + a)

________________________________________________________________________________________